#ifndef INTFIELDCONTROL_H_
#define INTFIELDCONTROL_H_

#include "Control.h"

/**
 * \class IntInputControl
 * \brief A Control-derivative class which the server renders as an input field on the web page
 *
 * HTML does not differentiate between types of input fields, but an \a atoi() method is performed on
 * the value of the input field and so it is understood that the field can contain only a double.
 * This limitation can be passed to the end user through the description.
 *
 * Input numbers will be truncated according to the \a atoi() method.
 */
class IntInputControl: public Control {
public:
	IntInputControl(std::string controlDescription);
	virtual ~IntInputControl();

	/**
	 * \brief redefinition of \a Element::getType() to return the correct value
	 * \return INTCONTROL
	 */
	int getType();
	void setValueInt(long newIntValue);
	long getValueInt();

	void setValue(void* newValue);

private:
	long valueInt;
};

#endif /* INTFIELDCONTROL_H_ */
